package com.ttmall.product.exception;

import com.ttmall.common.utils.R;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice(basePackages = "com.ttmall.product.controller")
public class ExceptionControllerAdvice {

    @ExceptionHandler(value = Throwable.class)
    public R handleException(Throwable throwable) {
        return R.error("未知异常");
    }
}
